package com.services.service;

import com.services.domain.Departments;

import java.util.List;

import com.services.dao.DepartmentsDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class EnterpriseServiceImpl implements EnterpriseService {
    
    @Autowired
    private DepartmentsDao departmentsDao;
    
//    @Transactional
//    public Departments findByDepartmentId(long deptId){
//        return departmentsDao.findByDepartmentId(deptId);    
//    }
    
    @Transactional
    public List<Departments> findAllDepartments() {
        return departmentsDao.findAllDepartments();    
    }
}
